<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>管理系统</title>
    <link rel="stylesheet" href="/css/layui.css">
</head>
<body class="layui-layout-body">
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">医院</label>
        <div class="layui-input-inline">
            <input type="text" name="hospital" id="hospital"  placeholder="医院" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">结果</label>
        <div class="layui-input-inline">
            <input type="text" name="result"  id="result" placeholder="结果" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">检测时间</label>
        <div class="layui-input-inline">
            <input name="happenTimeStr" type="text" class="layui-input" id="test1">
        </div>
    </div>
    <input type="hidden" name="id" id="id">
</form>

<script src="/layui.js"></script>
<script src="/js/jquery-3.3.1.js"></script>
<script>

    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test1'
            ,done: function(value, date, endDate){
                console.log(value); //得到日期生成的值，如：2017-08-18
                console.log(date); //得到日期时间对象：{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
                console.log(endDate); //得结束的日期时间对象，开启范围选择（range: true）才会返回。对象成员同上。
            }
        });

    });


</script>
</body>